#ifndef MISC_H
#define MISC_H

#include <linux/compiler.h>

void error(char *x) __noreturn;
extern unsigned long free_mem_ptr;
extern unsigned long free_mem_end_ptr;

#ifdef CONFIG_RTOS_CFI_MODE_ENFORCING
/*
 * rtos_hcfi_logger - a routine used for HCFI when checking tag of target symbol
 * failed in enforcing mode.
 * this routine does nothing, just ignoring tag inconsistencies, since this
 * function can only be triggered in decompressing the kernel image stage, that
 * is almost safe.
 */
extern void rtos_hcfi_report(void);
#endif /* CONFIG_RTOS_CFI_MODE_ENFORCING */

#ifdef CONFIG_RTOS_CFI_MODE_PERMISSIVE
/*
 * rtos_hcfi_logger - a routine used for HCFI when checking tag of target symbol
 * failed in permissive mode.
 * this routine does nothing, just ignoring tag inconsistencies, since this
 * function can only be triggered in decompressing the kernel image stage, that
 * is almost safe.
 */
extern void rtos_hcfi_logger(void);
#endif /* CONFIG_RTOS_CFI_MODE_PERMISSIVE */

#ifdef CONFIG_RTOS_HAL_HDLC_RESET_IN_BOOT
extern void v3fdd_hdlc_reset(void *dtb);
#endif

#ifdef CONFIG_RTOS_HAL_SHUTDOWN_NETWORK_IN_BOOT
extern void v3fdd_network_down(void *dtb);
#endif

#endif
